<%@ page language="java" 
    import="java.util.*"
    import="java.sql.*"
	import="com.lsnu.wzy.po.*"
	import="javax.servlet.http.HttpSession"
	contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
    <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
    <%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
    <%@ taglib uri="http://java.sun.com/jsp/jstl/functions"  prefix="fn"%> 
<!DOCTYPE html>
<html>
<body>
<head>
	<meta charset="utf-8"> 
	<title>医院网站</title>
	<link rel="stylesheet" href="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/css/bootstrap.min.css">  
	<script src="https://cdn.staticfile.org/jquery/2.1.1/jquery.min.js"></script>
	<script src="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/js/bootstrap.min.js"></script>
    <script type="text/javascript">
	$(document).ready(function(){
		  $("#b01").click(function(){
		  htmlobj=$.ajax({url:"/Hospital/jsp/test",async:false});
		  $("#myDiv").html(decodeURI(htmlobj.responseText));
		  });
		});
	 
	</script>
	<style>
    .fakeimg {
        height: 200px;
         background: #aaa;
    }
  </style>
</head>
<body>
<div class="jumbotron text-center" style="margin-bottom: 0;padding-top:0;padding-bottom:0">
		<%-- <h1 style='font-family: 仿宋'><%=((Patient) request.getSession().getAttribute("patient")).getpName()%>,欢迎您的到来！
		</h1>
		<p>感谢您对本医院的信任！</p> --%>
		<img alt="" src="/Hospital/jsp/img/f1.jpeg" width="100%" height="260px;">
	</div>

<nav class="navbar navbar-inverse">
  <div class="container-fluid">
    <div class="navbar-header">
      <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#myNavbar">
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>                        
      </button>
      <a class="navbar-brand" href="#">医院网站</a>
    </div>
    <div class="collapse navbar-collapse" id="myNavbar">
      <ul class="nav navbar-nav">
		<li class="active"><a href="/Hospital/jsp/index.jsp">主页</a></li>
		<li><a href="/Hospital/jsp/introduce.jsp">医院介绍</a></li>
		<li><a href="/Hospital/jsp/patientLogin.jsp">切换用户</a></li>
		<li><a href="/Hospital/html/login.html">管理员登录</a></li>
		<li style="margin-left:700px; font-size:40px; font-family:宋体">
			<a href="">当前就诊人：<%=((Patient) request.getSession().getAttribute("patient")).getpName()%></a>
		</li>
	  </ul>
    </div>
  </div>
</nav>

<div class="container">
  <div class="row">
    <div class="col-sm-2">
				<h3 class="nav nav-pills nav-stacked active">功能列表</h3>
				<ul class="nav nav-pills nav-stacked" style="margin-top:20px">
					<li><a href="/Hospital/doctorOption/lsDoctor2">医生信息</a></li>
					<li class="active"><a href="/Hospital/departmentOption/lsDepartment2">科室信息</a></li>
					<li><a href="/Hospital/appointOption/findByPname">个人预约信息</a></li>
					<li><a href="#">敬请期待</a></li>
				</ul>
				<div class="fakeimg" style=" font-family:宋体 ;margin-top:100px">
	    			<div id="myDiv">
	    				<h4><b><br>医院联系方式：</b></h4>
	    				<h4>联系电话：0931-1234567 </h4>
	    				<h4>QQ: 1226539386</h4>
	    			</div>
        			<!-- <button id="b01" type="button" class="btn btn-primary btn-lg">查看</button> -->
    			</div>
				<hr class="hidden-sm hidden-md hidden-lg">
			</div>
	<div class="col-sm-10">		
	  <h2>科室信息：</h2>
	<form action="/Hospital/departmentOption/findByName/{dpName}">
		<input type="text" name="dpName" value="${dpName}">
		<input type="submit" value="搜索" placeholder="请输入科室名">
	</form>
	
   	 <table class="table table-striped" id="tab">
	   <thead>
	     <tr>
	    	<th></th>	 
	    	<th class="sorting_asc">科室id</th>
			<th class="sorting">科室名称</th>
			<th class="sorting">科室简介</th>
	     </tr>
	   </thead>
	  
	   <c:forEach items="${departMent}" var="departmentlist">
		 <tr>
			<td><input name="ids" type="checkbox"></td>
			<td>${departmentlist.dpID}</td>
			<td>${departmentlist.dpName}</td>
			<td width="60%">${departmentlist.intro}</td>
		</tr>
	   </c:forEach>  
	  </table>
    </div>
  </div>
</div>

<div class="jumbotron text-center" style="margin-bottom:0">
  <p>@版权所有 2021-人工智能学院</p>
  <p>乐山师范学院</p>
</div>
</body>
</html>